home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / BMP2BPI.ZIP / bmp2bpi.txt < prev    next >
Internet Message Format  |  1994-12-17  |  1KB

  1. From: springer@dellgate.us.dell.com (David Springer)
  2. Newsgroups: rec.games.programmer
  3. Subject: Re: Displaying Windows BMP files in DOS
  4. Date: 1 Dec 1994 01:23:59 GMT
  5.  
  6. Maybe this'll help.  I never intended anyone else to use it so don't
  7. give me any crap about the comments (or lack thereof).  I do all my
  8. graphics for 640x480x16 mode in Windows (I'm planning to port the
  9. stuff sometime) but display it now under DOS.  The BMP format is
  10. really inefficient (packed pixel) so I convert it with this program
  11. into 4 separate plane images.  I just made some very simple images and
  12. then figured out what the BMP format was for the width and height,
  13. etc.  I didn't do any more than I needed.  I think you can find a full
  14. description of BMP format by ftp'ing to teeri.oulu.fi and look in the
  15. games programming section.
  16.  
  17. Oh yeah, now that I look at it there's a command line option
  18. designating a "transparent" color.  This was so I can have irregularly
  19. shaped objects drawn over a background that shows through where I want
  20. it.  You basically get to pick one color that you don't use for
  21. anything else in that particular drawing and specifiy it as
  22. transparent.  This program will create a fifth bit plane and turn on
  23. the pixel in that plane corresponding to that color.  It's then a
  24. simple matter for the display routine in your game to use data from
  25. the fifth plane to determine where to allow the original pixel to
  26. shine through.
  27.  
  28.  
  29.  
  30.